package com.vegetable.modules.service.outbound.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vegetable.modules.entity.outbound.AllocationOutDetail;
import com.vegetable.modules.mapper.outbound.AllocationOutDetailMapper;
import com.vegetable.modules.service.outbound.IAllocationOutDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 销售订货 服务类
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-27
 */
@Slf4j
@Service
public class AllocationOutDetailServiceImpl extends ServiceImpl<AllocationOutDetailMapper, AllocationOutDetail> implements IAllocationOutDetailService {


    @Override
    public List<AllocationOutDetail> selectByOrderId(Long orderId) {
        QueryWrapper<AllocationOutDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("out_order_id", orderId);
        return this.baseMapper.selectList(queryWrapper);
    }

    @Override
    public void insert(AllocationOutDetail out) {
        this.baseMapper.insert(out);
    }

}
